package vip.george.bean;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import vip.george.bean.config.AppConfig;
import vip.george.bean.service.BookService;


public class App8 {

    public static void main(String[] args) {
        AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(AppConfig.class);
        String[] beanDefinitionNames = applicationContext.getBeanDefinitionNames();
        for (String beanDefinitionName : beanDefinitionNames) {
            System.out.println(beanDefinitionName);
        }

        System.out.println("============");
        BookService book = applicationContext.getBean(BookService.class);
        book.check();

    }
}
